#!/bin/bash

echo "set title \"Option value difference vs volatility\"
set key right bottom
set xlabel \"Volatility (percent)\"
set ylabel \"Option value difference\"
set output \"tree-vol.png\"
set terminal png
plot \"-\" using 1:(column(2)) notitle
"

COUNT=10
until [ $COUNT -gt 99 ]; do
    echo -n "$COUNT "
    ./tree -c -n 500 -s 0.$COUNT | tail -n-1 | awk '{ print $1, $2, $3}'
    let COUNT=COUNT+1
done 
echo "end"
